package com.example.demo.service.Imp;

import com.example.demo.dao.InformationMapper;
import com.example.demo.model.Information;

import com.example.demo.service.InformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class InformationServiceImp implements InformationService {
    @Autowired
    private InformationMapper informationMapper;

    @Override
    public Information selectByPrimaryKey(Integer iid){
        return informationMapper.selectByPrimaryKey(iid);
    }

    //获取全部公司信息

    @Override
    public List<Information> getEnterprise(){
        System.out.println("执行角色类型SQL语句");
        return informationMapper.getEnterprise();}
    @Override
    public List<Information> getAllInf() {
        return informationMapper.getAllInf();
    }

    //删除公司信息
    @Override
    public int delInformation(Integer iid) {
        return informationMapper.delInformation(iid);
    }

    //添加公司信息
    @Override
    public int insertInformation(Information informationmodel) {
        return informationMapper.insertInformation(informationmodel);
    }

    //修改公司信息
    @Override
    public int editInformation(Information informationmodel) {
        return informationMapper.editInformation(informationmodel);
    }


}
